package com.example.wx.dailyreport.controller;


import com.example.wx.dailyreport.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author hulinbo
 * @since 2020-08-06
 */
@RestController
@RequestMapping("/report")
public class ReportController {

    @Autowired
    private ReportService reportService;

    @GetMapping("/getreportbyid")
    public Map<String, Object> getReportById(Integer id) {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("status", 200);
        map.put("data", reportService.getById(id).getReportcontent());
        return map;
    }


}

